package com.hunan.api.catv.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hunan.api.catv.entity.po.News;
import com.hunan.api.catv.entity.vo.NewsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface NewsDao extends BaseMapper<News>, BaseDao<News, NewsVo, Integer> {

    Integer incrCount(News news);

    Integer decrCount(News news);

    Integer totalNum(Integer columnId);

    List<Integer> listIdsForPGC(News news);

    List<Integer> getUgcListById(@Param("columnId") Integer columnId, @Param("dateTime") Long dateTime);

    List<Integer> newsIdList(@Param("columnId") Integer columnId);

    News getNewsInfoByFileId(@Param("fileId") String fileId);

    void updateNewUrl(News news);
}